package com.qk.management.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.qk.common.PageResult;
import com.qk.dto.operateLog.OperateLogListDTO;
import com.qk.entity.OperateLog;
import com.qk.management.mapper.OperateLogMapper;
import com.qk.management.service.OperateLogService;
import com.qk.vo.operateLog.OperateLogListVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 *author：sch
 *createTime：2025/10/17 17:13
 *description：
 */
@Service
@Slf4j
@SuppressWarnings("all")
public class OperateLogServiceImpl extends ServiceImpl<OperateLogMapper, OperateLog> implements OperateLogService {
    @Override
    public PageResult<OperateLogListVO> operateLogList(OperateLogListDTO dto) {
        PageHelper.startPage(dto.getPage(), dto.getPageSize());
        Page<OperateLogListVO> page = (Page<OperateLogListVO>) this.baseMapper.selectCustomerList(dto);
        return PageResult.<OperateLogListVO>builder()
                .total(Long.valueOf(page.getTotal()).intValue())
                .rows(page.getResult())
                .build();
    }
}